﻿<Window x:Class="XIES.UI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="XIES - xRM Import/Export Solutions" Height="700" Width="1024" WindowStartupLocation="CenterScreen">
    

    <Grid Margin="0,0,-6,0">
        <Grid Margin="10,10,528,287">
            <GroupBox Header="SOURCE"  HorizontalAlignment="Left" Width="470" Margin="0,0,0,-10" RenderTransformOrigin="0.5,0.5">
                <GroupBox.LayoutTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </GroupBox.LayoutTransform>
                <GroupBox.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                    </TransformGroup>
                </GroupBox.RenderTransform>
                <DockPanel Margin="0,0,-12,-12">
                    <Button x:Name="bAddOrgS" Content="Add Organizations" Height="50" VerticalAlignment="Top" Margin="10,10,0,10" HorizontalAlignment="Left" Width="160" Click="bAddOrgS_Click"/>
                    <Button x:Name="bAddFiles" Content="Add Files"  VerticalAlignment="Top" Height="50" Margin="120,10,0,10" DockPanel.Dock="Top" HorizontalAlignment="Left" Width="160" Click="bAddFiles_Click"/>
                    <TreeView x:Name="tvSource" Height="273" Margin="-160,0,0,0" VerticalAlignment="Top" Width="439" HorizontalAlignment="Left" AllowDrop="True">
                                 
                        <TreeViewItem Header="TreeViewItem1"/>
                        <TreeViewItem Header="TreeViewItem"/>
                        <TreeView.ItemContainerStyle>
                            <Style TargetType="{x:Type TreeViewItem}">
                                <!-- We have to select the item which is right-clicked on -->
                                <!--EventSetter Event="TreeViewItem.PreviewMouseRightButtonDown" Handler="TreeViewItem_PreviewMouseRightButtonDown"/-->
                                <EventSetter Event="TreeViewItem.DragOver" Handler="treeView_DragOver"/>
                                <EventSetter Event="TreeViewItem.Drop" Handler="treeView_Drop"/>
                                <EventSetter Event="TreeViewItem.MouseMove" Handler="treeView_MouseMove"/>
                            </Style>
                        </TreeView.ItemContainerStyle>
                    </TreeView>
                </DockPanel>
            </GroupBox>
        </Grid>
        <GroupBox Header="TARGET" Height="375" Margin="0,10,10,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="484" HorizontalContentAlignment="Right">
            <DockPanel Margin="0,0,0,0">
                <Button x:Name="bAddOrgT" Content="Add Organizations" Height="50" VerticalAlignment="Top" Margin="10,10,0,10" HorizontalAlignment="Left" Width="160"/>
                <TreeView x:Name="tvTarget" Height="273" Margin="-160,70,-20,0" VerticalAlignment="Top" Width="440" HorizontalAlignment="Left" AllowDrop="True">
                <TreeView.ItemContainerStyle>
                    <Style TargetType="{x:Type TreeViewItem}">
                        <!-- We have to select the item which is right-clicked on -->
                        <!--<EventSetter Event="TreeViewItem.PreviewMouseRightButtonDown" Handler="TreeViewItem_PreviewMouseRightButtonDown"/>-->
                        <EventSetter Event="TreeViewItem.DragOver" Handler="treeView_DragOver"/>
                        <EventSetter Event="TreeViewItem.Drop" Handler="treeView_Drop"/>
                        <EventSetter Event="TreeViewItem.MouseMove" Handler="treeView_MouseMove"/>
                    </Style>
                </TreeView.ItemContainerStyle>
                </TreeView>
            </DockPanel>
        </GroupBox>
        <GroupBox Header="Script Reader" HorizontalAlignment="Left" Margin="10,390,0,10" Width="756">
            <TextBlock x:Name="tScriptReader" HorizontalAlignment="Left" Height="232" Margin="10,10,10,10" TextWrapping="Wrap" VerticalAlignment="Top" Width="746" Background="Black" Foreground="White" FontFamily="Consolas"/>
        </GroupBox>
        <Button x:Name="bExport" Content="Export" HorizontalAlignment="Left" Height="50" Margin="771,390,0,0" VerticalAlignment="Top" Width="232"/>
        <Button x:Name="bImport" Content="Import" HorizontalAlignment="Left" Height="50" Margin="771,445,0,0" VerticalAlignment="Top" Width="232"/>
        <Button x:Name="bGenerateS" Content="Generate Script" HorizontalAlignment="Left" Height="50" Margin="771,500,0,0" VerticalAlignment="Top" Width="232"/>
        <Button x:Name="bExit" Content="Exit" HorizontalAlignment="Left" Height="50" Margin="771,600,0,0" VerticalAlignment="Top" Width="232" Click="bExit_Click"/>
    </Grid>
</Window>
